# 插件系统示例运行脚本

Clear-Host

Write-Host "======================================" -ForegroundColor Cyan
Write-Host "  Python 插件系统示例" -ForegroundColor Cyan
Write-Host "======================================" -ForegroundColor Cyan
Write-Host ""

Write-Host "运行示例程序..." -ForegroundColor Green
Write-Host ""

# 安装依赖（如果需要）
Write-Host "[1/2] 检查依赖..." -ForegroundColor Yellow
c:\work\code\cpt\.venv39\Scripts\python.exe -m pip install pyyaml -q

if ($LASTEXITCODE -eq 0) {
    Write-Host "      ✅ 依赖检查完成" -ForegroundColor Gray
} else {
    Write-Host "      ⚠️  依赖安装失败，继续运行..." -ForegroundColor Yellow
}

Write-Host ""

# 运行示例
Write-Host "[2/2] 运行示例程序..." -ForegroundColor Yellow
Write-Host ""
Write-Host "======================================" -ForegroundColor Cyan
Write-Host ""

c:\work\code\cpt\.venv39\Scripts\python.exe example_usage.py

Write-Host ""
Write-Host "======================================" -ForegroundColor Cyan
Write-Host "按任意键退出..." -ForegroundColor Gray
pause
